home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / mc51bugs.zip / Q31792 < prev    next >
Text File  |  1989-03-08  |  3KB  |  85 lines

  1. Q31792 Application Note for the Printf() Function
  2. Microsoft C Compiler
  3. 5.10   | 5.10
  4. MS-DOS | OS/2
  5.  
  6. Summary:
  7.  
  8. The following application note contains replacement object files to
  9. correct a problem with formatted output in the Microsoft C Compiler
  10. Version 5.10 run time. Specifically, the printf family of functions
  11. would not zero fill floating-point numbers when the specified
  12. precision is zero. This problem occurs with printf(), cprintf(),
  13. sprintf(), fprintf(), vprintf(), vfprintf(), and vsprintf() functions.
  14. This update corrects the problem with all of these functions.
  15.  
  16. This problem is demonstrated in the following example:
  17.  
  18. #include <stdio.h>
  19.  
  20. main(void)
  21. {
  22.  
  23.     printf("%04.0f\n", 12.34);
  24.  
  25. }
  26.  
  27. The current run-time library will output '  12'. With this update, the
  28. library will output '0012'.
  29.  
  30. More Information:
  31.  
  32. The following is a list of the files on the application note:
  33.  
  34.    README.DOC              This file
  35.  
  36.    UPDATE.BAT              DOS batch file to update all libraries
  37.  
  38.    UPDATE.CMD              OS/2 batch file to update all libraries
  39.  
  40.    OUTPUT.S                OUTPUT.OBJ for small-model libraries
  41.  
  42.    OUTPUT.M                OUTPUT.OBJ for medium-model libraries
  43.  
  44.    OUTPUT.C                OUTPUT.OBJ for compact-model libraries
  45.  
  46.    OUTPUT.L                OUTPUT.OBJ for large-model libraries
  47.  
  48.    OUTPUT.CRT              OUTPUT.OBJ for CDLLOBJS.LIB
  49.  
  50.    OUTPUT.DLL              OUTPUT.OBJ for LLIBCDLL.LIB
  51.  
  52.    OUTPUT.MT               OUTPUT.OBJ for LLIBCMT.LIB
  53.  
  54.    CPRINTF.S               CPRINTF.OBJ for small-model libraries
  55.  
  56.    CPRINTF.M               CPRINTF.OBJ for medium-model libraries
  57.  
  58.    CPRINTF.C               CPRINTF.OBJ for compact-model libraries
  59.  
  60.    CPRINTF.L               CPRINTF.OBJ for large-model libraries
  61.  
  62.    CPRINTF.CRT             CPRINTF.OBJ for CDLLOBJS.LIB
  63.  
  64.    CPRINTF.DLL             CPRINTF.OBJ for LLIBCDLL.LIB
  65.  
  66.    CPRINTF.MT              CPRINTF.OBJ for LLIBCMT.LIB
  67.  
  68. To update your libraries, place the above files in the same directory
  69. as the libraries and type UPDATE. This process may take some time
  70. depending on the number of libraries you created during installation.
  71.  
  72. The update procedure will create a backup of each library with the
  73. file extension .BAK. After you assure yourself that the update was
  74. completed without error (i.e., insufficient disk space), delete the
  75. backups. The original combined libraries always can be regenerated
  76. with the SETUP program and the distribution disks.
  77.  
  78. This file can be found in the Software Library by searching for the
  79. filename, the Q number, or S12014. This application note also is
  80. available from Microsoft Product Support Services by calling (206)
  81. 454-2030.
  82.  
  83. Keywords:  softlib appnote buglist5.10
  84. Updated  89/03/08 13:53
  85.